package com.puman.common;

import com.opensymphony.xwork2.ActionContext;

public class AjaxCheckimg{
	private String checkcode;
	private boolean flag;
	private String errorMsg="";
	public String execute(){
		String checkcode2 = (String) ActionContext.getContext().getSession().get("checkcode");
		if(checkcode.equalsIgnoreCase(checkcode2)){
			flag = true;
			errorMsg="";
			return "success";
		}else{
			errorMsg="验证码错误";
			flag = false;
			return "error";
			
		}
		
	}
	
	public String getCheckcode() {
		return checkcode;
	}

	public void setCheckcode(String checkcode) {
		this.checkcode = checkcode;
	}

	public boolean isFlag() {
		return flag;
	}
	public void setFlag(boolean flag) {
		this.flag = flag;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}
	
}
